package com.justnow.offer;

import com.sun.imageio.plugins.wbmp.WBMPImageReader;

import java.util.HashMap;
import java.util.HashSet;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadPoolExecutor;

public class TestDemo {
    public static void main(String[] args) {
        HashSet<String> set = new HashSet<>();
        for (int i = 0; i < 100; i++) {
            new Thread(() -> {
                Lazy instance = Lazy.getInstance();
                set.add(instance.toString());
            }).start();
        }
        System.out.println(set.size());
    }
}
